#ifndef SURVEY_H
#define SURVEY_H

//Full Survey class documention in the cpp file

//Our includes
class Leg;

//Std
#include <vector>
#include <string>

/*!
  \class Survey

  A Survey helps orginizes a set of Legs. Usually a survey has survey trip
  information, such as: people involved, date, instruments used etc...
  Since, this is a base class these specific information is not define and
  defined in subclass.

  */
class Survey {
public:
    //Constructor
    Survey();

    //Deconstructor
    virtual ~Survey();

    //Adds a Leg to the survey
    void AddLeg(Leg* Leg);

    //Removes a Leg from the survey
    void RemoveLeg(Leg* Leg);

    //Gets the Leg a the index
    Leg* GetLeg(int index) const;

    //Gets the number of Legs
    int GetNumberOfLegs() const { return Legs.size(); }

    //Set the name of the survey
    void SetName(const std::string& name) { Name = name; }

    //Get the name of the survey
    const std::string& GetName() const { return Name; }

    //!Gets a survey at an index
    Survey* GetSurvey(int index) const { return Surveys.at(index); }

    //!Adds a child survey
    void AddChildSurvey(Survey* survey) { Surveys.push_back(survey); }

    //Removes a child survey
    void RemoveChildSurvey(Survey* survey);

    //!Gets the number of child suveyes
    int GetNumberOfChildSurveys() const { return Surveys.size(); }

protected:
    std::string Name;
    std::vector<Leg*> Legs;
    std::vector<Survey*> Surveys;

};

#endif // SURVEY_H
